package com.prim.thread;

public class StopThread extends Thread {
    int i, j = 0;

    @Override
    public void run() {
        synchronized (this) {
            i++;
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            j++;
        }
    }

    public void print() {
        System.out.println("i=" + i + " j=" + j);
    }
}
